libxl: fix validation of scheduling parameters for sedf
authorDario Faggioli <raistlin@linux.it>
Fri, 22 Jun 2012 16:43:30 +0000 (17:43 +0100)
committerDario Faggioli <raistlin@linux.it>
Fri, 22 Jun 2012 16:43:30 +0000 (17:43 +0100)
commit1b25d80157c0cfff9b142b74e0858cc745e95039
tree617b5079daaaf639f35339050074ccb112602d84
parent1448429664da9a3c33fc64cbbdde6508b86ecb2e
libxl: fix validation of scheduling parameters for sedf

2205914617cb does its job in correcting the "wrong domain being
considered" issue introduced by 9d1fd58ff602. Unfortunately, when
dealing (again!) with the sedf scheduler, it is required for the
vCPUs of a domain to have been allocated and setup already (in
the hypervisor), when the first call to libxl_domain_sched_params_get()
happens, and that is not true.

This fixes that by avoiding calling that function at all, as we
only need to know which scheduler the domain is running under,
and that is provided by libxl__domain_scheduler() which is safe
to be called there.

While at it, also improve a bit the comments about the whole
sedf parameter validation and mangling process.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c